Skip to content

Add support for listing workflows for all users#104

Merged
daniel-thom merged 5 commits intomainfrom
feat/list-all-users
Feb 6, 2026
Merged

Add support for listing workflows for all users#104
daniel-thom merged 5 commits intomainfrom
feat/list-all-users

Conversation

@daniel-thom
Copy link
Collaborator

  • Adds support for listing workflows for all users
  • Fixes bug that caused jobs to sometimes not start when job runtimes matched slurm walltime values.
  • Fixes bug that allowed invalid Slurm job IDs to get stored in the database, which prevented workflows from being reinitialized.

A user's workflow didn't run because it took more than 60 seconds for
the torc job runner to fully initialize.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for listing workflows from all users via a new --all-users CLI flag, and fixes two important bugs related to Slurm job scheduling. When access control is enabled, the --all-users flag respects access permissions, showing only workflows the authenticated user can access (owned or group-shared). The PR also increases the default compute node expiration buffer from 60 to 180 seconds and enforces a minimum of 120 seconds to prevent jobs from failing to start when their runtimes closely match Slurm walltime values. Additionally, it fixes a critical bug where invalid Slurm job IDs (placeholder value 0) could be stored in the database by reordering the database record creation to occur only after successful Slurm job submission.

Changes:

  • Added --all-users flag to workflows list command with proper access control integration
  • Increased default compute node expiration buffer from 60 to 180 seconds with 120-second minimum
  • Fixed Slurm job submission to store valid job IDs by creating database records after successful submission

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
torc-slurm-job-runner/src/main.rs Updated default expiration buffer to 180 seconds and added 120-second minimum enforcement
torc-server/src/server.rs Added access control logic to list_workflows endpoint to filter by accessible workflow IDs
tests/test_workflows.rs Added test for workflows list --all-users without authentication
tests/test_access_groups.rs Added comprehensive test for workflows list --all-users with access control enabled
src/server/api/workflows.rs Implemented new list_workflows_filtered method with access control support and refactored existing list_workflows to use it; updated default buffer to 180 seconds
src/models.rs Updated default compute_node_expiration_buffer_seconds to 180
src/client/commands/workflows.rs Added --all-users flag, WorkflowTableRow struct, and display logic for all-users workflow listing
src/client/commands/slurm.rs Fixed bug by creating scheduled compute node records only after successful Slurm job submission with valid job IDs
julia_client/Torc/src/api/models/model_WorkflowModel.jl Updated default compute_node_expiration_buffer_seconds to 180
api/openapi.yaml Updated default compute_node_expiration_buffer_seconds to 180 in API specification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@daniel-thom daniel-thom marked this pull request as ready for review February 6, 2026 19:01
@daniel-thom daniel-thom merged commit 64960b6 into main Feb 6, 2026
3 checks passed
@daniel-thom daniel-thom deleted the feat/list-all-users branch February 6, 2026 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant